<?php
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);

$key = 'user.score';


$page = 1;
$count = 10;
$list = [];
//list分页
do {
	$start = ($page-1) * $count;
	$end = $start + $count-1;
	$rows = $redis->lRange($key, $start, $end);
    if ($rows) {
        $list[] = $rows;
    }
	if (!$rows || count($rows)< $count) {
	    break;
    }
} while($page++);

var_dump($list);


